MODSIGN: Import certificates from UEFI Secure Boot
authorJosh Boyer <jwboyer@fedoraproject.org>
Fri, 5 May 2017 07:21:59 +0000 (08:21 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 18 Jul 2019 22:23:17 +0000 (23:23 +0100)
commit3c12f30d352608c6244f6410f29ebfd19d28df36
tree7e8d40c507b438d26280fc402362312a0caa7b8f
parenteae292e5136f3bc0541d2e0bd20f15ce9ad60f18
MODSIGN: Import certificates from UEFI Secure Boot

Secure Boot stores a list of allowed certificates in the 'db' variable.
This imports those certificates into the system trusted keyring.  This
allows for a third party signing certificate to be used in conjunction
with signed modules.  By importing the public certificate into the 'db'
variable, a user can allow a module signed with that certificate to
load.  The shim UEFI bootloader has a similar certificate list stored
in the 'MokListRT' variable.  We import those as well.

Secure Boot also maintains a list of disallowed certificates in the 'dbx'
variable.  We load those certificates into the newly introduced system
blacklist keyring and forbid any module signed with those from loading and
forbid the use within the kernel of any key with a matching hash.

This facility is enabled by setting CONFIG_LOAD_UEFI_KEYS.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Gbp-Pq: Topic features/all/db-mok-keyring
Gbp-Pq: Name 0004-MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch
certs/Kconfig
certs/Makefile
certs/load_uefi.c [new file with mode: 0644]